package cn.xuguowen.user.convert;

import cn.xuguowen.user.entity.pojo.SysUser;
import cn.xuguowen.user.entity.req.SysUserReq;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * ClassName: SysUserReqConvert
 * Package: cn.xuguowen.user.convert
 * Description:
 *      SysUserReq 对象转换为 SysUser
 * @Author 徐国文
 * @Create 2023/3/5 12:47
 * @Version 1.0
 */
@Mapper
public interface SysUserReqConvert {

    SysUserReqConvert INSTANCE = Mappers.getMapper(SysUserReqConvert.class);

    /**
     * 程序运行之后，会在内部生成一个接口的代理实现类对象。
     *
     * 注意：如果两个对象之间的属性名称不相同的时候，可以使用@Mapping注解
     * @param sysUserReq
     * @return
     */
    // @Mapping(source = "age",target = "nianLing")
    SysUser SysUserReqToSysUser(SysUserReq sysUserReq);
}
